package com.ninthgroup.service.Impl;

import com.ninthgroup.entity.Log;
import com.ninthgroup.mapper.LogMapper;
import com.ninthgroup.service.LogService;
import com.ninthgroup.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：1452863884@qq.com rcg
 * @date ：Created in 2022/11/3 19:10
 * @description：日志的实现
 * @modified By：
 * @version:1.0
 */
@Service
public class LogServiceImpl implements LogService {

    @Autowired
    private LogMapper logMapper;

    @Override
    public Result save(Log log) {
        int i = logMapper.insertSelective(log);
        return new Result(200,"保存日志成功");
    }

    @Override
    public Result selectAll() {

        List<Log> logs = logMapper.selectAll();
        return new Result(200,"查询反射日志成功",logs);
    }
}